{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form action="index.php?a=resource.qa" method="post">
                <div class="box-header with-border">
                    <span class="fa fa-check-square-o" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">内容页</p>	
                </div>
                 <div class="box-body">
                      <h4 class="text-center">{%$resource_data.resource_title%}</h4>
                        <div class="col-md-6">
                            <p class="text-right">上传人：<span>{%$resource_data.user_name%}</span></p>
                        </div> 
                        <div class="col-md-6">
                            <p class="text-left">上传时间：<span>{%$resource_data.create_time%}</span></p>
                        </div>
   
			           <div class="form-group">
					         <label class="col-sm-1 text-right">资源说明：</label>
						     <p class="col-sm-11">{%$resource_data.resource_content%}</p>	 
                             <label class="col-sm-1 text-right">附件：</label>  
                             <p class="col-sm-11"><a href="index.php?a=resource.output&resource_file={%$resource_data.resource_file%}">{%$resource_data.resource_file%}</a></p>
						</div>
                         {%if $uid eq $resource_data.user_id%}
                           <div class="form-group">
                                    <label class="col-sm-1 text-right">回复内容：</label>
                                    <p class="col-sm-11">{%$resource_data.qa%}。</p>
                            </div>
                         {%else%}
				   </div><!--box-body -->
                
                 <div class="box-footer text-center">
                     <div class="form-group">
                         <input type="hidden" name="resource_id" value="{%$resource_id%}">
                         <label class="col-md-1 control-label text-right">
                             回复框：
                         </label>
                         <div class="input-group col-md-11 col-sm-12 col-xs-12">
                             <textarea name="question" class="form-control" rows="3"></textarea>
                         </div>
                     </div>
                     <button type="submit" class="btn btn-primary"> 回 复</button>
                 </div>
                 {%/if%}
               </form>
           </div><!--box box-default box-solid-->
        </section>   
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
<script type="text/javascript">
$(pageInit);
function pageInit()
{
  $.extend(XHEDITOR.settings,{shortcuts:{'ctrl+enter':submitForm}});//修改默认设置
  $('#category_content').xheditor({modalWidth:700,modalHeight:500,upBtnText:'浏览',upLinkUrl:"!ckfinder/upload.html",upImgUrl:"!ckfinder/upload.html?type=Images",upFlashUrl:"!ckfinder/upload.html?type=Flash",upMediaUrl:"!ckfinder/upload.html"});
}
function submitForm(){$('#myform').submit();}
</script>
  {%include file="index.footer.tpl.php"%}